package com.cgwx.service;

import com.cgwx.entity.Authority;
import com.cgwx.entity.AuthorityInfo;
import com.cgwx.entity.FileFolder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
public interface IAuthorityService {

    List<Authority> getAuthority(String account, String entityId);

    List<Authority> getAuthority(Authority authority);

    String checkAuthority(String account, String deptId, String entityId);

    @Transactional
    String initAuthority(String account, String deptId, String entityId, String level);

    @Transactional
    String updateAuthority(String account, String deptId, String entityId, List<Map<String, String>> depts, List<Map<String, String>> ids, String level);

    boolean insertAuthority(Authority authority);

    List<AuthorityInfo> getMemberAuthority(String account, String deptId, String entityId);

    @Transactional
    String deleteAuthority(String account, String deptId, String entityId, String id, String type);

    List<String> getChildrenAndMyselfRecycleBin(String entityId);

    List<String> getChildrenAndMyself(String entityId);

    List<FileFolder> getChildrenAndMyself2(String entityId);

    @Transactional
    String insertMember(String account, String deptId, String entityId, List<Map<String, String>> depts, List<Map<String, String>> ids);

    boolean addFolderManager(String entityId, String account);

    String generateId();
}
